package com.jasonchoi.rabbitmq.consumer;

import com.jasonchoi.rabbitmq.config.TopicRabbitConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 监听的队列名称 TestDirectQueue
 * @Author: JasonChoi
 * @Date: 2020/5/28 16:11
 */
@Component
//@RabbitListener(queues = DirectRabbitConfig.TEST_DIRECT_QUEUE)
@RabbitListener(queues = TopicRabbitConfig.SECOND_TEST_TOPIC)
//@RabbitListener(queues = FanoutRabbitConfig.FANOUT_B)
public class TestConsumer2 {
    @RabbitHandler
    public void consume(String message){
        System.out.println("第二个TestConsumer进行消费：" + message);
    }
}
